import request from '@/utils/request'

// 获取会议附件列表
export function getMeetingAttachments(meetingId) {
  return request({
    url: `/meeting-attachments/meeting/${meetingId}`,
    method: 'get'
  })
}

// 上传会议附件
export function uploadMeetingAttachment(file, meetingId) {
  const formData = new FormData()
  formData.append('file', file)
  formData.append('meetingId', meetingId)
  
  return request({
    url: '/meeting-attachments/upload',
    method: 'post',
    data: formData,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

// 删除会议附件
export function deleteMeetingAttachment(id) {
  return request({
    url: `/meeting-attachments/${id}`,
    method: 'delete'
  })
} 